package com.woniuxy.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import com.woniuxy.entity.Bidding;
import com.woniuxy.entity.Product;
import com.woniuxy.entity.Sign;
@Mapper
public interface LogMapperAop {

	
	@Insert("insert into log values(default,#{u_id},'收藏了',CONCAT('产品id:',#{p_id}),now())")
	 public int addCollection(int u_id,int p_id );//收藏操作
		@Insert("insert into log values(default,#{u_id},'预约报名了',CONCAT('产品id:',#{p_id}),now())") 
	public int addSigner(int u_id,int p_id); //记录报名操作
		
@Insert("insert into log values(default,#{u_id},CONCAT('出价',#{price}),CONCAT('产品id:',(select p_id from bidding_room where br_id=#{br_id})),now())"
				)
		 public int addBidding(Bidding bidding);//记录竞价操作
	
@Insert("insert into log values(default,#{u_id},'访问浏览了',CONCAT('产品id:',#{p_id}),now())")
public Product findProductById(int pid,int u_id);//谁访问了p_id
	
}
